import React, { Component } from 'react'


class Footer extends Component {
  render(){
    return (<>
      <footer style={{backgroundColor: '#f66', height: 50}}> 页脚 </footer>
    </>)
  }
}
// 高阶组件
const Page1 = ()=>{
  return (<>
    <h1>page1 页面</h1>
    <Footer></Footer>
  </>)
}

const Page2 = ()=>{
  return (<>
    <h1>page2 页面</h1>
    <Footer></Footer>
  </>)
}

export default class App extends Component {
  render() {
    return (
      <div>

        <Page1></Page1>

        <hr />
        <hr />
        <hr />
        <Page2></Page2>

      </div>
    )
  }
}
